// pages/looknotice/looknotice.js
import cache from '../../utils/Cache.js';
import url from '../../utils/url.js';
import http from '../../utils/http.js';
Page({

  /**
   * 页面的初始数据
   */
  data: {
      datalist : []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this;
    http.http(url.noticeList,'GET',{openid:cache.getSorg('openid')},function(res){
        that.setData({
          datalist:res
        });
    });
  },
  //拨打电话
  callphone:function(evt){
    let phoneNumber = evt.currentTarget.dataset.phone
    wx.makePhoneCall({
      phoneNumber: phoneNumber,
    })
  },

  
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  }
})